package com.sheng.web.controller.web.contoller;

import com.sheng.domain.User;
import com.sheng.service.UserService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class UserServletImpl {
    @Test
    public void  findAll(){
      ApplicationContext act = new ClassPathXmlApplicationContext("applicationContext.xml");
      UserService userService = (UserService) act.getBean("userService");
        List<User> all = userService.findAll();
        for (User user : all) {
            System.out.println(user);
        }
    }
}
